package com.example.week02.day2;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;


import com.example.week02.R;
import com.example.week02.day2.Activity.RecyclerView_1;
import com.example.week02.day2.Activity.constraint_layout;

public class day2 extends AppCompatActivity {

    Button constraint_1,RecyclerView_1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_day2);
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
            return insets;
        });

        constraint_1 = findViewById(R.id.constraint_1);
        RecyclerView_1 = findViewById(R.id.RecyclerView_1);


        constraint_1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(day2.this, constraint_layout.class);
                startActivity(intent);
            }
        });

        RecyclerView_1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(day2.this, RecyclerView_1.class);
                startActivity(intent);
            }
        });



    }
}